package com.kaishengit.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.kaishengit.entity.Project_has_t_contact;
import com.kaishengit.util.DBHelp;
import com.kaishengit.util.RowMapper;

public class Project_has_t_contactDao {

	private DBHelp<Project_has_t_contact> db = new DBHelp<Project_has_t_contact>();
	
	public void Save (String t_contact_id,String t_project_id) {
		String sql = "insert into t_project_has_t_contact(t_contact_id,t_project_id) values(?,?)";
		db.executeSQL(sql, t_contact_id,t_project_id);
	}
	
	private class Project_has_t_contactRowMapper implements RowMapper<Project_has_t_contact> {
		
		public Project_has_t_contact mapperRow(ResultSet rs) throws SQLException {
			
			Project_has_t_contact pro_con = new Project_has_t_contact();
			pro_con.setT_contact_id(rs.getString("t_contact_id"));
			pro_con.setT_project_id(rs.getString("t_project_id"));
			return pro_con;
		}
	}
}
